package com.scedu.springcloud.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serializable;

@Data
@NoArgsConstructor
@Accessors(chain = true) //支持链式写法
@TableName("dept")
public class Dept implements Serializable {
    @TableId(value = "deptno", type = IdType.AUTO)
    private Long deptno;//主键
    private String dname;
    //这个数据数存在哪个数据库的字段
    private String dbSource;
    public Dept(String dname){
        this.dname=dname;
    }
}
